package com.config;

import org.apache.log4j.DailyRollingFileAppender;
import org.apache.log4j.Priority;

public class Log4jDailyRollingFileAppender extends DailyRollingFileAppender{
	@Override
    public boolean isAsSevereAsThreshold(Priority priority) {
		//error日志分离
		if (this.getThreshold().toInt() == Priority.ERROR_INT){
			return this.getThreshold().equals(priority);
		} else {
			return priority.toInt() != Priority.ERROR_INT;
		}
    }
	
}

